package com.swz.dcrm.adpter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.swz.dcrm.R;
import com.swz.dcrm.base.ViewHolder;

import java.util.List;

public class UtilAdapter extends CustomAdapter<String> {
    public UtilAdapter(Context context, List<String> datas) {
        super(context, R.layout.item_util, datas);
    }

    @Override
    protected void convert(ViewHolder holder, String s, int position) {

        if(s.equals(mContext.getString(R.string.mine_manager_util_1))){
            holder.setImageResource(R.id.iv,R.mipmap.worker_management);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_2))){
            holder.setImageResource(R.id.iv,R.mipmap.target_management);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_3))){
            holder.setImageResource(R.id.iv,R.mipmap.group_management);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_4))){
            holder.setImageResource(R.id.iv,R.mipmap.news_management);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_5))){
            holder.setImageResource(R.id.iv,R.mipmap.schedule_management);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_6))){
            holder.setImageResource(R.id.iv,R.mipmap.contact);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_7))){
            holder.setImageResource(R.id.iv,R.mipmap.approval_management);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_8))){
            holder.setImageResource(R.id.iv,R.mipmap.management_analysis);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_9))){
            holder.setImageResource(R.id.iv,R.mipmap.daily_report);
        }else if(s.equals(mContext.getString(R.string.mine_manager_util_10))){
            holder.setImageResource(R.id.iv,R.mipmap.monthly_report);

        }
        holder.itemView.setOnClickListener(v -> {
            onClickListener.onItemClick(s);
        });
        holder.setText(R.id.tv_name,s);
    }
}
